在使用相关方案时, 请在项目中添加 babelpostcss 基础配置文件

  • 添加 ${app_root}/.babelrc 文件

具体根据实际情况添加相关 babel 插件配置,以下仅仅是举例:

{
  "presets": [["env",{ "modules": false }]],
  "plugins": [
    "transform-object-rest-spread",
    "syntax-dynamic-import",
    "transform-object-assign"
  ],
  "comments": false
}
  • 添加 ${app_root}/postcss.config.js 文件

具体根据实际情况添加 postcss 配置,以下仅仅是举例:

'use strict';
module.exports = {
  plugins: [
    require('autoprefixer')
  ]
};

Author: sky
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint polocy. If reproduced, please indicate source sky !
 Previous
webpack.config.js webpack.config.js
webpack.config.js
2019-10-20 sky
Next 
全部配置项 全部配置项
webpack.config.js 参数配置说明// ${app_root}/webpack.config.js module.exports = { framework: 'html' entry:{ } ......
2019-10-20 sky